<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <?php include "../public_flow/flow_show_optbut.php";?>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">

        <div><?php include "../public_flow/flow_show_info.php";?></div>


        <div class="table-box tablenes">
            <div class="title">项目信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">项目名称</td><td class="tv colorlan" id="bidid_name"></td><td class="tt">项目状态</td><td class="tv" id="bid_state"></td></tr>
                <tr><td class="tt">委托方</td><td class="tv" id="bid_weier"></td><td class="tt">已收费用金额(元)</td><td class="tv" id="bid_shou_fee"></td></tr>
                </tbody>
            </table>
        </div>

        <div class="table-box tablenes">
            <div class="title">本次支付信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">支付编号</td><td class="tv" id="number" colspan="3"></td></tr>
                <tr><td class="tt">款项摘要</td><td class="tv" id="zhai"></td><td class="tt">本次支付合计(元)</td><td class="tv" id="money"></td></tr>
                <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>



        <div><?php include "../public/upinfo_show.php";?></div>

        <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>

        <div class="table-box tablenes">
            <script type="text/html" id="toolbarDemo_list">支付明细
            </script>
            <div class="tableShow">
                <table id="datalist_list" lay-filter="datalist_list"></table>
            </div>
        </div>


        <div><?php include '../public_flow/flow_show_shenlog.php'?></div>
        <div><?php include '../public_flow/flow_show_talk.php'?></div>
        <div><?php include '../public/opt_browse.php'?></div>
    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;

    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_bid_dian_zhi_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data.data;
                var bidinfo = res.data.bidinfo;

                if(bidinfo){
                    $("#bidid_name").text(bidinfo.name).click(function () {
                        openPage('../bid/show.php?id='+bidinfo.id);
                    });
                    $("#bid_state").text(bidinfo.state_name_wen);
                    $("#bid_weier").text(bidinfo.weier);
                    $("#bid_shou_fee").text(bidinfo.bid_shou_fee);
                }



                $("#number").text(data.number);
                $("#zhai").text(data.zhai);
                $("#money").text(data.money);
                $("#explain").text(data.explain);


                var mytableList = table.render({
                    elem: "#datalist_list",data:res.data.list, toolbar: '#toolbarDemo_gong', page: false
                    ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                    ,defaultToolbar: TabInitShow.defaultToolbar,filter: TabInitShow.filter ,text: TabInitShow.text
                    ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                    , cols: [[
                        {type:'numbers',title:'序号',fixed:'left'}
                        ,{field: 'touunit', title: '投标单位'}
                        ,{field: 'feitype_name', title: '款项类型'}
                        ,{field: 'dianfee', title: '垫付金额(元)'}
                        ,{field: 'dianer_name', title: '垫付人'}
                        ,{field: 'money', title: '本次支付金额(元)'}
                        ,{field: 'incdaotype_name', title: '支付方式'}
                        ,{field: 'duier', title: '付款对象'}
                        ,{field: 'banknum', title: '账号'}
                        ,{field: 'bankname', title: '开户行'}
                        ,{field: 'explain', title: '款项说明'}
                        ,{field:'',title:'支付状态',templet: function(d){
                                if(d.kuaninfo){return d.kuaninfo.paystate_name;}
                                return '';
                            }}
                        ,{field:'',title:'已支付金额(元)',templet: function(d){
                                if(d.kuaninfo){
                                    return '<span class="colorlan" onclick="openNavPage(\'查看交易明细信息\',\'account_list/index.php?kuanid='+d.kuaninfo.id+'\')">'+parseFormatNum(d.kuaninfo.payfee)+'</span>';
                                }
                                return '';
                            }}
                        ,{field:'',title:'未支付金额(元)',templet: function(d){
                                if(d.kuaninfo){return parseFormatNum(d.kuaninfo.paynofee)}
                                return '';
                            }}
                    ]]
                    , done: function (res) {
                        soulTable.render(this);
                    }
                });


                public_flow_show_display(res.data.billinfo);
                public_upload_show_file('upload_files', res.data.files);
                render_from();
            }
        });

        public_get_readsandlog('bid_dian_zhi', param_id);
    });



</script>
</body>
</html>




